Power loss protection

ABSTRACT

Power loss in a client device is detected. In response to the detecting of the power loss, an electronic card is alerted that the power loss is about to occur, where the electronic card includes a volatile storage and a non-volatile storage. A transfer of data from the volatile storage to the non-volatile storage is triggered in response to the alert.

BACKGROUND

A system, such as a computer or other type of electronic system, caninclude a storage device to store data. In some cases, a storage devicecan include both volatile storage and non-volatile storage. Volatilestorage refers to storage that loses data stored in the volatile storageif power is removed from the volatile storage. A non-volatile storage,on the other hand, maintains data stored in the non-volatile storageeven if power is removed from the non-volatile storage.

BRIEF DESCRIPTION OF THE DRAWINGS

Some implementations are described with respect to the followingfigures.

FIG. 1A is a block diagram of an example arrangement that includes apower-loss detection circuit, a temporary power source, and anelectronic card being protected by the power-loss detection circuit andthe temporary power source, in accordance with some implementations.

FIG. 1B is a block diagram of an example power-loss protectionsubsystem, according to some implementations.

FIGS. 2 and 3 are schematic diagrams of example arrangements accordingto various implementations.

FIGS. 4A and 4B are schematic diagrams of example power-loss detectioncircuits, according to various implementations.

FIG. 5 is a flow diagram of an example power-loss protection process,according to some implementations.

DETAILED DESCRIPTION

An electronic card can be connected to a client device, such as to anexternal port of the client device or to an internal connection point(e.g. a socket, a circuit board attachment, etc.) in the client device.A “client device” can refer to any system or electronic device that isavailable for single-user use at a given time. In other words, at anygiven time, one user is able to use the client device using user-inputcomponents of the client device to interact with the client device.Examples of user-input components can include one or any combination ofthe following: an input mouse device, an input pointer device, akeyboard, a touchpad, a touchscreen, and so forth. A client devicediffers from a server device that is concurrently accessible over anetwork by multiple users.

An electronic card can include a support substrate on which is mountedvarious electronic components. The support substrate can be a circuitboard or other type of support substrate, and can include communicationchannels (e.g. electrically conductive traces, optical paths, etc.) forconnecting to input/output (I/O) elements (e.g. electrical pins, opticalferrules, etc.) of various components on the support substrate.

An electronic card can include volatile storage and non-volatilestorage. A “storage” can refer to one or multiple storage devices, oralternatively, a “storage” can refer to a portion of a storage device(or a portion of multiple storage devices). A volatile storage losesdata stored in the volatile storage when power is removed from thevolatile storage. On the other hand, a non-volatile storage can maintaindata stored in the non-volatile storage even if power is removed fromthe non-volatile storage.

When an electronic card that includes a volatile storage and anon-volatile storage is used with a client device, power can be providedto the electronic card by the client device. When power loss occurs inthe client device, then data in the volatile storage of the electroniccard can be lost when the client device is no longer able to supplypower to the electronic card. Power loss of the client device can occurdue to various reasons, such as a battery of the client device beingdepleted, the client device being unplugged from a power outlet, a faultor error occurring, or for any other reason.

In accordance with some implementations, a power-loss detection circuitand a temporary power source can be provided to protect an electroniccard from data loss due to loss of power at a client device to which theelectronic card is operatively coupled. The electronic card isoperatively coupled to a client device if the electronic card is incommunication with the client device and power is being supplied to theelectronic card by the client device. As an example, the electronic cardcan be plugged into an external port of the client device, or can beconnected to an internal connection point in the client device.

FIG. 1A is a schematic diagram of an example arrangement that includesan electronic card 102 that has a control input 104 and a power input106. Note that the electronic card can include various other inputs (aswell as outputs) that are not shown. The various inputs and outputs canbe in the form of I/O electrical pins, optical ferrules, or other I/Oelements used for establishing communication with components external ofthe electronic card 102. The I/O elements can be part of a connector 105(or multiple connectors) of the electronic card 102. The connector 105can be connected to a mating connector (such as a mating connector in aport of the client device), or alternatively, the connector 105 can beconnected to a cable (e.g. electrical cable, optical cable, etc.).

The electronic card 102 includes a volatile storage 108 and anon-volatile storage 110. In addition, the electronic card 102 includesa storage controller 114 that is able to control the volatile storage108 and the non-volatile storage 110. In other examples, multiplestorage controllers, one for each of the volatile storage 108 andnon-volatile storage 110, can be provided.

In some examples, the electronic card 102 is a storage card whoseprimary functionality is to store data, such as when the electronic card102 is operatively coupled to the client device 116. An example of astorage card includes a solid state storage (SSD) card, which caninclude one or multiple flash memory devices or other types ofnon-volatile storage devices.

In other examples, the electronic card 102 can be a different type ofelectronic card. For example, the electronic card 102 can be in anetwork interface card, a graphics processing card, a processor card,and so forth. In such cases, the electronic card 102 can include othercomponents (not shown) to perform other functionalities of theelectronic card 102.

Various components of the electronic card 102 can be mounted on asupport substrate 103 of the electronic card 102. The support substrate103 can be a circuit board or any other type of support substrate. Insome examples, the components of the electronic card 102 can be mountedon one support surface of the support substrate 103. In other examples,components of the electronic card 102 can be mounted on multiple supportsurfaces of the support substrate 103.

FIG. 1A also shows a power-loss detection circuit 118 and a temporarypower source 120. The power-loss detection circuit 118 receives anindicator 122, which can be an indicator from the client device 116 thatthat power loss may occur. In some examples, as discussed further belowin connection with FIG. 4A, the indicator 122 can be a power-good signalbeing deactivated by the client device 116 (discussed further below). Inother examples, as discussed further below in connection with FIG. 4B,the indicator 122 can be the main power voltage of the client device 116dropping below a threshold voltage (discussed further below). Inresponse to the indicator 122, the power-loss detection circuit 118 canactivate a power-loss signal 124 to the control input 104 of theelectronic card 102. The power-loss signal 124 indicates to theelectronic card 102 that power loss is about to occur at the clientdevice 116.

The temporary power source 120 can be any type of power source that cantemporarily supply power (in the form of an output power voltage 121) tothe electronic card 102 when a main power voltage 126 from the clientdevice 116 is not available. The main power voltage 126 can be providedby a power supply (not shown) of the client device 116.

As examples, the temporary power source 120 can include an arrangementof one or multiple capacitors that can be charged. When the arrangementof capacitor(s) is selectively connected to the electronic card 102 by aconnection circuit 128 (such as due to loss of the main power voltage126), power from the charged capacitor(s) can be supplied through thepower input 106 to power various components of the electronic card 102,such as the storage controller 114, volatile storage 108, andnon-volatile storage 110. If the electronic card 102 includes othercomponents, these other components may or may not receive power from thetemporary power source 120.

During normal operation of the client device 116 when the main powervoltage 126 is available from the client device 116 (i.e. the main powervoltage 126 is at a level that is within a specified active range), theconnection circuit 128 selectively connects the main power voltage 126to the power input 106, and the temporary power source 120 is isolatedfrom the power input 106. In some implementations, the main powervoltage 126 can charge the temporary power source 120 through theconnection circuit 128.

In other examples, the temporary power source 120 can include one ormultiple batteries instead of or in addition to an arrangement ofcapacitor(s).

The connection circuit 128 used to selectively connect one of thetemporary power source 120 and the main power voltage 126 to the powerinput of the electronic card 102 can have a relatively simple design.For example, the connection circuit 128 can be implemented with passiveswitches such as diodes. Alternatively, the connection circuit 128 canbe implemented with active switches such as transistors. In accordancewith some implementations, to reduce complexity, the connection circuit128 is not implemented with a switching matrix that is able toselectively connect any one of multiple inputs to any one of multipleoutputs.

In response to the power-loss signal 124 received at the control input104, the electronic card 102 can perform a data protection process,which can include copying or moving data in the volatile storage 108 tothe non-volatile storage 110. The data protection process can beperformed while the electronic card is powered by the temporary powersource 120 (due to the main power voltage 126 not being available).

In some examples, the moving of data in the volatile storage 108 to thenon-volatile storage 110 can refer to flushing the data from thevolatile storage 108 to the non-volatile storage 110. The dataprotection process is considered to “harden” the data in the electronicdevice 102, since the data is moved to a location that allows the datato be maintained when power is removed from the electronic card 102(such as due to the temporary power source 120 becoming depleted aftersome time has passed).

In some implementations, as shown in FIG. 1B, the power-loss detectioncircuit 118 and the temporary power source 120 can be considered to bepart of a power-loss protection subsystem or apparatus 150. Moreover, insome implementations, the connection circuit 128 can also be consideredto be part of the power-loss protection subsystem 150. In some examples,the power-loss protection subsystem 150 can be included in the clientdevice 116. In other examples, the power-loss protection subsystem 150can be separate from the client device 116, and can be provided on acircuit board that is connectable to the electronic card 102.Alternatively, the power-loss protection subsystem 150 and theelectronic card 102 can be mounted on a common circuit board.

In each of the foregoing examples, the power-loss protection subsystem150 is separate from the electronic card 102. The power-loss protectionsubsystem 150 can thus be considered to be an off-device or off-cardpower-loss protection subsystem for the electronic card 102.

In some implementations, the electronic card 102 can be an M.2 card thatconforms to the M.2 standard, formerly referred to as the NextGeneration Form Factor (NGFF) standard. The M.2 standard (provided bythe Peripheral Component Interconnect Special Interest Group or PCI-SIG)defines a form factor for an electronic card. A form factor of anelectronic card can refer to the dimensions of the electronic card andother properties, such as locations of mounting structures (e.g.mounting holes, mounting notches, mounting pins, etc.), and otherproperties. In addition, the M.2 standard also defines the connector 105to be used on an electronic card, including the position of theconnector, the number of pins on the connector, and the actual signaland power pins used on the connector 105.

According to the M.2 standard, a communication medium that isconnectable to the connector 105 of the M.2 electronic card 102 (such asa communication medium between the client device 116 and the M.2electronic card 102) operates according to a Peripheral ComponentInterconnect Express (PCIe) standard. Thus, the communication mediumbetween the electronic card 102 and the client device 116 can be a PCIebus. PCIe defines a high-speed serial computer expansion bus standard.In such examples, the connector 105 of the M.2 electronic card 102 is aPCIe connector.

In examples where the communication medium between the electronic card102 and the client device 116 is a PCIe bus, the control input 104 tothe electronic card 102 that receives the power-loss signal 124 can be aPERST# input according to the PCIe standard. The PERST# input is a linkinterface reset input of the electronic card 102. When activated, thePERST# input when activated indicates that a power supply voltage is atan operational level (in other words, the power supply voltage is withina specified voltage tolerance and is stable). The PERST# input whenactivated also causes initialization of logic in the electronic card 102once the power supply voltage stabilizes. As long as the PERST# input isactive (asserted to a low state, for example), link interfacefunctionality of the electronic card 102 relating to a PCIe bus are heldin reset. In response to the PERST# input being deactivated (ordeasserted to a high voltage, for example), the link interface functionsof the electronic card 102 can be started and activated. A linkinterface function can refer to a function of the electronic card 102relating to communicating over a communication medium, such as a PCIebus.

In other examples, the electronic card 102 can be a different type ofelectronic card (different from an M.2 electronic card), and acommunication medium between the electronic card 102 and the clientdevice 116 can be a different type of communication medium.

In further examples, the electronic card 102 can be a Serial AdvancedTechnology Attachment (SATA) card that can operate according to the SATAprotocol. In such examples, the control input 104 can be a control inputaccording to the SATA protocol. For example, the control input 104 canbe an input that is used to place the electronic card 102 into a lowerpower state. According to SATA, such a control input can be referred toas a DEVSLP input, which when activated indicates to the electronic card102 that the electronic card 102 is to enter into a low power state. Alow power state can refer to a power state in which various components(or all components) of the electronic card 102 are placed into a poweroff state.

FIG. 2 is a schematic diagram of an example arrangement according tosome implementations. In the example of FIG. 2, the temporary powersource 120 includes an arrangement of capacitors 202 that can be chargedto a particular voltage, where the charge of the capacitors 202 can beused for temporarily powering the electronic card 102 when the mainpower voltage 126 is not available. In the example of FIG. 2, the mainpower voltage 126 is supplied through a diode 204 to a node 206 that isconnected to an input of a voltage regulator 208. The diode 204 can bepart of the connection circuit 128.

The voltage regulator 208 receives the main power voltage 126 (whenavailable) through the diode 204, and produces an output voltage at theoutput of the voltage regulator 208 at a specified regulated voltage.Note that the output of the diode 204 is a voltage that is equal to themain power voltage 126 less a threshold voltage of the diode 204. Thevoltage at the input of the voltage regulator 208 can be different fromthe voltage at the output of the voltage regulator 208.

The regulated voltage output by the voltage regulator 208 can beprovided as an input power voltage 210 supplied to the power input 106of the electronic card 102. In some examples, the main power voltage 126can be at about 12 volts, while the input power voltage 210 output bythe voltage regulator 208 can be at about 3.3 volts. In other examples,the main power supply voltage 126 and the input power voltage 210 can beat different voltages.

The connection circuit 128 also includes a resistor 212 and a diode 214connected in parallel between the output power voltage of the temporarypower source 120 and the node 206 that is connected to the input of thevoltage regulator 208. When the main power voltage 126 is available, thediode 214 is off (while the diode 204 is on) to allow current to flowfrom a main power supply (of the client device 116) to the voltageregulator 208. In addition, the power from the main power supply canalso charge the capacitors 202 through the resistor 212.

When the main power voltage 126 is no longer available (off), the diode204 shuts off, and the power voltage from the temporary power source 120flows through the diode 214 (which is on) to the input of the voltageregulator 208, which outputs the regulated output voltage in response tothe power voltage from the temporary power source 120.

FIG. 3 is a schematic diagram of an example arrangement according toalternative implementations. In FIG. 3, the temporary power source 120includes a battery. The connection circuit 128 to selectively connectthe main power voltage 126 and the power voltage of the battery 120 tothe node 206 (connected to the input of the voltage regulator 208) caninclude a battery control circuit 304, which is able to control whetherthe power voltage of the battery 120 is supplied to the node 206.

The connection circuit 128 can also include a fault-sense circuit 306,which is used to determine whether a fault at the main power voltage126. In addition, the connection circuit 128 can include a chargecircuit 308 to allow the main power supply to charge the battery 120.

The main power voltage 126 when available is passed through the diode204 to the input of the voltage regulator 208. In this scenario, thefault-sense circuit 306 detects that there is power from the main powersupply, and thus, the fault-sense circuit 306 does not assert afault-sense indication to the battery control circuit 304. When thefault-sense indication is not present, the battery control circuit 304isolates the battery 120 from the node 206 that is connected to theinput of the voltage regulator 208.

However, if the main power voltage 126 is no longer available, thefault-sense circuit 306 activates a fault-sense indication to thebattery control circuit 304, which causes the battery control circuit304 to couple the power voltage of the battery 120 to the node 206 thatis connected to the input of the voltage regulator 208. In this case,the diode 204 is turned off. The voltage regulator 208 can output itsregulated voltage in response to the power voltage from the battery 120,for powering the electronic card 102.

In a variant of the FIG. 3 implementations, instead of using thepower-loss detection circuit 118 to provide the power-loss signal 124 tothe control input 104 of the electronic card 102, the fault-sensecircuit 306 can instead be used to provide the power-loss signal 124 tothe control input 104 of the electronic card 102.

In another variant of the FIG. 3 implementations, instead of using thefault-sense circuit 306, the power-loss detection circuit 118 can beused to supply the fault-sense indication to the battery control circuit304.

FIG. 4A illustrates an example power-loss detection circuit 118according to some implementations. The output of the power-lossdetection circuit 118 is a PERST_M2# signal, which can be connected tothe control input 104 of the electronic card 102. The PERST_M2# signal(an example of the power-loss signal 124 of FIG. 1A or 1B) is producedby the output of an AND gate 402, which receives two inputs: a PERST#signal (or more generally a link interface reset signal) from the clientdevice 116, and a PGood signal (or more generally a power-good signal)from the client device 116. The PERST# signal can be a signal accordingto the PCIe protocol.

The PGood signal when deactivated low indicates that power is notavailable at the client device 116, either due to a normal shutdownprocedure or due to a fault or other error. The PGood signal whendeactivated low is an example of the indicator 122 of FIG. 1A or 1B. ThePGood signal when activated high indicates that power is available atthe client device 116. When the PGood signal is deactivated low, the ANDgate activates the PERST_M2# signal to a low state.

The PERST_M2# signal is an active low signal. This signal is activatedwhen either PERST# from the client device 116 is active low, or PGood isdeactivated low.

Although specific example input signals to the AND gate 402 are depictedin FIG. 4, it is noted that in other examples, other types of inputsignals can be provided to the AND gate 402. Moreover, in otherexamples, the power-loss detection circuit 118 can include other logic.

FIG. 4B is a schematic diagram of an example power-loss detectioncircuit 118 according to alternative implementations. The power-lossdetection circuit 118 of FIG. 4B includes a comparator 410 that comparesa voltage Vsense to a reference voltage Vref (a specified thresholdvoltage). The voltage Vsense is provided by a voltage divider includingresistors 412 and 414 connected between Vin (which is the main powervoltage 126 from the client device 116) and ground.

If Vsense is greater than Vref, then the comparator 410 maintains thepower-loss signal 124 deactivated. However, if Vsense is lower thanVref, then the comparator 410 activates the power-loss signal 124.

FIG. 5 is a flow diagram of a power-protection process according to someimplementations. The power-protection process of FIG. 5 detects (at 502)power loss in the client device 116. The detecting can be performed bythe power-loss detection circuit 118.

In response to the detecting of the power loss, the power-loss detectioncircuit 118 outputs (at 504) a signal to the control input 104 of theelectronic card 102 for indicating to the electronic card that the powerloss is about to occur. The signal outputted to the control input 104 ofthe electronic card 102 is an example of how the power-loss detectioncircuit 118 can alert the electronic card 102 that power loss is aboutto occur.

The power-protection process further includes triggering (at 506) atransfer of data from the volatile storage 108 to the non-volatilestorage 110, in response to the power-loss signal 124. The transfer ofdata from the volatile storage 108 to the non-volatile storage 110 canbe performed while the electronic card 102 is powered by the temporarypower source 120.

By using the power-loss protection subsystem according to someimplementations, which is separate from the electronic card beingprotected, user experience can be enhanced since data loss is preventedor made less likely due to power loss at a client device. By using theseparate power-loss protection subsystem according to someimplementations, the electronic card would not have included power-lossprotection components, which can make the electronic card more complexor costly.

In the foregoing description, numerous details are set forth to providean understanding of the subject disclosed herein. However,implementations may be practiced without some of these details. Otherimplementations may include modifications and variations from thedetails discussed above. It is intended that the appended claims coversuch modifications and variations.

What is claimed is:
 1. A power-loss protection apparatus comprising: apower source; and a power-loss detection circuit to detect an indicationof power loss in a client device, and to output an alert signal to anelectronic card that power loss is about to occur, the power-lossprotection apparatus being separate from the electronic card, theelectronic card including a volatile storage and a non-volatile storage,and wherein the alert signal is to trigger a transfer of data from thevolatile storage to the non-volatile storage using power from the powersource; and wherein the power-loss detection circuit is to alert theelectronic card by outputting the alert signal to a pin of an interfacewith the electronic card, the pin being designated for receipt of thealert signal that power loss is about to occur.
 2. The power-lossprotection apparatus of claim 1, wherein the pin designated for receiptof the alert signal is a link interface reset control input of theinterface.
 3. The power-loss protection apparatus of claim 1, whereinthe pin designated for receipt of the alert signal is a PERST# inputaccording to a Peripheral Component Interconnect Express (PCIe)standard.
 4. The power-loss protection apparatus of claim 1, wherein thepin designated for receipt of the alert signal also otherwise receives asignal indicating that a power supply voltage is at an operationallevel.
 5. The power-loss protection apparatus of claim 1, wherein thepower-loss detection circuit alerts the electronic card that power lossis about to occur upon detecting a power voltage in the client devicedropping below a threshold voltage.
 6. The power-loss protectionapparatus of claim 1, further comprising circuitry to selectively couplethe power source to the electronic card in response to the alert signal.7. The power-loss protection apparatus of claim 6, wherein the circuitryis comprises a diode.
 8. The power-loss protection apparatus of claim 6,wherein the circuitry is comprises a transistor.
 9. The power-lossprotection apparatus of claim 1, wherein the power source includes acapacitor.
 10. The power-loss protection apparatus of claim 1, whereinthe power source includes a battery.
 11. A power-loss protectionapparatus comprising: a power source; a PCIe bus to connect with anelectronic card; and a power-loss detection circuit to detect anindication of power loss in a client device, and to output an alertsignal that power loss is about to occur to an electronic card via thePCIe bus, the electronic card including a volatile storage and anon-volatile storage, and wherein the alert signal is to trigger atransfer of data from the volatile storage to the non-volatile storageusing power from the power source; and wherein the power-loss detectioncircuit is to alert the electronic card by outputting the alert signalto a control input of the PCIe bus.
 12. The power-loss protectionapparatus of claim 11, wherein the control input is a link interfacereset input of the PCIe bus.
 13. The power-loss protection apparatus ofclaim 11, wherein the control input is a PERST# input of the PCIe bus.14. The power-loss protection apparatus of claim 13, wherein the outputof the power-loss detection signal is a PERST_M2# signal produced by anAND gate which receives a PERST# signal and a power-good signal from theclient device.
 15. The power-loss protection apparatus of claim 11,wherein the power-loss detection circuit comprises a comparator tocompare a voltage (Vsense) to a reference voltage (Vref), wherein Vsensecorresponds to a main power voltage of the client device.
 16. Apower-loss protection apparatus comprising: an interface to receive aconnection with an electronic card; a power source charged by a mainpower line, the main power line also providing power to the interface;and a fault sense circuit to monitor the main power line for a faultcondition and, in response to detection of the fault condition, tooutput an alert signal to the interface that power loss is about tooccur; the electronic card including a volatile storage and anon-volatile storage, and wherein the alert signal is to trigger atransfer of data from the volatile storage to the non-volatile storageusing power from the power source; and wherein the fault circuit is toalert the electronic card by outputting the alert signal to a pin of theinterface with the electronic card, the pin being designated for receiptof the alert signal that power loss is about to occur.
 17. Thepower-loss protection apparatus of claim 16, wherein the power sourcecomprises a battery.
 18. The power-loss protection apparatus of claim17, wherein the fault sense circuit is to output a control signal to abattery control circuit.
 19. The power-loss protection apparatus ofclaim 16, further comprising a diode in the main power line upstream ofthe fault sense circuit.
 20. The power-loss protection apparatus ofclaim 11, wherein the fault sense circuit is to output the alert signalto a pin of the interface with an electronic card, the pin beingdesignated for receipt of the alert signal that power loss is about tooccur.